Skip to content

[pull] master from marmelab:master#48

Merged
pull[bot] merged 3 commits intoStars1233:masterfrom
marmelab:master
Jul 3, 2025
Merged

[pull] master from marmelab:master#48
pull[bot] merged 3 commits intoStars1233:masterfrom
marmelab:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Jul 3, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.2)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Refactor the documentation site to standardize Storybook metadata handling in navigation scripts and enhance the Demos page with new portal cards and image embeds.

Enhancements:

  • Introduce a constant for the storybook_path meta selector in ra-navigation.js, read its content directly, update it after AJAX navigation, and correct the Storybook launch icon path.

Documentation:

  • Add a "Developer portal" demo card and embed images for the Team Wiki in Demos.md.
  • Replace the API Hub iframe embed with a Markdown image link in Demos.md.
  • Always render the storybook_path meta tag in the default layout for consistent access by navigation scripts.

@pull pull bot added the ⤵️ pull label Jul 3, 2025
@gitnotebooks
Copy link
Copy Markdown

gitnotebooks bot commented Jul 3, 2025

Review these changes at https://app.gitnotebooks.com/Stars1233/react-admin/pull/48

@pull pull bot merged commit 482e8cf into Stars1233:master Jul 3, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jul 3, 2025

Reviewer's Guide

This PR refactors the retrieval and usage of the storybook_path meta tag in ra-navigation.js by introducing a constant selector, directly accessing the content, adjusting asset paths, and dynamically updating the meta on content replacement. It also updates documentation by adding a new Developer Portal card, replacing an iframe embed with a linked image, and ensuring the storybook_path meta tag is always rendered in the default layout.

Class diagram for refactored storybook_path meta handling in ra-navigation.js

classDiagram
    class ra_navigation_js {
        +buildPageToC()
        +replaceContent(text)
        -STORYBOOK_PATH_META_SELECTOR
        -storybookPathMetaContent
    }
    ra_navigation_js : +buildPageToC() uses STORYBOOK_PATH_META_SELECTOR
    ra_navigation_js : +replaceContent(text) updates meta[storybook_path]
Loading

File-Level Changes

Change Details Files
Extract and standardize the storybook_path meta selector
  • Introduce STORYBOOK_PATH_META_SELECTOR constant
  • Replace inline selector strings with the constant
  • Directly access .content property for meta queries
  • Adjust conditional to check content rather than element existence
docs/js/ra-navigation.js
Update Storybook link and icon paths
  • Use content variable in Storybook URL instead of querying element each time
  • Change launch icon src from '/img/icons/launch.png' to './img/icons/launch.png'
docs/js/ra-navigation.js
Dynamically update storybook_path meta on content replacement
  • Query new meta from temporary element after replaceContent
  • Set the main meta tag's content attribute to the new value
docs/js/ra-navigation.js
Add Developer portal card to Demos documentation
  • Insert a new card element with title, description, image, and source link
docs/Demos.md
Replace iframe embed with linked image for API Hub
  • Remove iframe wrapper and embed code
  • Add a markdown image link pointing to the API Hub static graphic
docs/Demos.md
Ensure storybook_path meta always rendered in default layout
  • Remove conditional wrapper around meta tag in default.html
docs/_layouts/default.html

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants